package builder;

import java.util.Vector;

import model.Action;

public class AdapterBuilder extends AbstractPatternBuilder {
	
	private String client = "Client";
	private String target = "Target";
	private String adapter = "Adapter";
	private String adaptee = "Adaptee";
	
	public AdapterBuilder() {
		super();
	}

	@Override
	public Vector<Action> buildPattern() {
		
		this.buildClass(client);
		this.buildClass(adapter);
		this.buildClass(adaptee);
		
		this.buildAbstractClass(target);

		this.buildGeneralization(adapter, target);
		
		this.buildAssociation(adapter, adaptee);
		this.buildAssociation(client, target);
		
		return patternActions;
	}

	@Override
	public void changeNames() {

		this.client = names.get(0);
		this.target = names.get(1);
		this.adapter = names.get(2);
		this.adaptee = names.get(3);
		
	}
	
	@Override
	public int cantUMLElements() {
		return 4;
	}

}
